<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue数据代理</title>
    <script src="../commonjs/vue.js"></script>
</head>
<body>
<script type="text/javascript">
    Vue.config.productionTip = false;//关闭开发提示
    let obj = {x:'20'};
    let obj2 = {y:'30'};
    Object.defineProperty(obj2,'x',{
        get(){
            return obj.x;
        },
        set(value){
            obj.x = value
        }
    })
</script>
</body>
</html>